#pragma once
extern "C" {
#include <libavcodec\avcodec.h>
#include <libavformat\avformat.h>
#include <libavutil\opt.h>
}
class Encoder
{
public:
	Encoder(AVCodecID id, int width, int height);
	~Encoder();
	int encodeVideo(AVPacket * avpkt, const AVFrame * frame, int * got_packet_ptr);
	bool open();
private:
	AVCodec *m_codec;
	AVCodecContext *m_codecCtx;
	AVCodecID m_id;
	int m_width;
	int m_height;
};